//
//  Edge.swift
//  SwiftyDSA
//
//  Created by Archer on 2018/8/15.
//  Copyright © 2018年 Archer. All rights reserved.
//

import Foundation

public enum EType {
    case undetermined
    case tree
    case cross
    case forword
    case backword
}

/// 边
public final class Edge<E> {
        
    /// 数据
    var data: E
    /// 权重
    var weight: Int
    /// 状态
    var type: EType
    
    init(_ data: E, _ weight: Int) {
        self.data = data
        self.weight = weight
        self.type = .undetermined
    }
}
